home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #1 / Amiga Plus CD - 2000 - No. 1.iso / Tools / HD / SmartFileSystem / V1.58 / Sources / fs / transactions.h < prev   
Encoding:
C/C++ Source or Header  |  1998-06-23  |  1.2 KB  |  56 lines

  1. #include <exec/types.h>
  2. #include <libraries/iffparse.h>
  3. #include "blockstructure.h"
  4. #include "redblacktree.h"
  5.  
  6. /* Operation   : A single block modification
  7.    Transaction : A series of block modifications which together result in a valid disk */
  8.  
  9. struct OperationInformation {
  10.   UWORD length;     /* Length in bytes of the compressed data. */
  11.   BLCK blckno;
  12.   UBYTE bits;       /* Bit 0: When set indicates that this block has no original. */
  13.   UBYTE data[0];
  14. };
  15.  
  16. #define OI_EMPTY (1)
  17.  
  18.  
  19.  
  20. struct Operation {
  21.   struct Operation *left;
  22.   struct Operation *right;
  23.   struct Operation *parent;
  24.   NodeColor color;
  25.   UBYTE new;
  26.  
  27. //  struct Operation *next;
  28. //  struct Operation *previous;
  29.  
  30.   struct OperationInformation oi;
  31. };
  32.  
  33.  
  34. #define TRANSACTIONSTORAGE_ID   MAKE_ID('T','R','S','T')
  35. #define TRANSACTIONFAILURE_ID   MAKE_ID('T','R','F','A')
  36. #define TRANSACTIONOK_ID        MAKE_ID('T','R','O','K')
  37.  
  38. /* The blocks used for storing the Transaction buffer are linked in a
  39.    singly linked list.  The data they hold is a direct copy of all
  40.    Transaction data. */
  41.  
  42. struct fsTransactionStorage {
  43.   struct fsBlockHeader bheader;
  44.  
  45.   BLCK next;
  46.  
  47.   UBYTE data[0];
  48. };
  49.  
  50.  
  51. struct fsTransactionFailure {
  52.   struct fsBlockHeader bheader;
  53.  
  54.   BLCK firsttransaction;
  55. };
  56.